14. Upgrades and Rollbacks

14.1 Upgrade Principles

Treat IX25 upgrades as controlled changes to a stateful platform.

Recommended principles:

  • back up before upgrading

  • render and review manifests before applying

  • avoid changing too many variables at once

  • test in non-production first

  • pin image tags explicitly

  • monitor the rollout until all services are healthy

14.2 Pre-Upgrade Checklist

Before running helm upgrade, confirm:

  • the cluster is healthy

  • Traefik CRDs are available

  • the namespace has enough compute and storage capacity

  • referenced Secrets and ConfigMaps exist

  • a recent backup exists and is restorable

  • the values files have been reviewed

Useful checks:

Kopieren
kubectl -n ix25 get pods
kubectl -n ix25 get ingressroutes.traefik.io
helm list -n ix25
helm get values ix25 -n ix25

Keycloak Static Admin Removal

The bundled realm import no longer includes the static admin user. The admin service account remains available for realm initialization. For new installations, configure admin provisioning through realm-init or your own process when keycloak.realmInit.enabled=false. This change does not include a migration to delete users from existing realms.

Remove keycloak.serviceClient.impersonatedUserId from your values files. The chart no longer sends KEYCLOAK_IMPERSONATED_USER_ID to App Builder, App Portal, or Process Builder; service-client credentials and token endpoints remain configured.

Keycloak Admin Client Migration for 1.14

Release 1.14 removes components.studioBackend.keycloakAdmin.* and keycloak.realmInit.adminClientId; Helm rejects values files that still contain them. Move the realm to keycloak.realmName, and move the shared client ID and secret configuration to keycloak.adminClient.clientId and keycloak.adminClient.clientSecret.* before upgrading.

The chart-managed Secret name changes from *-studio-keycloak-client to *-keycloak-admin-client. An explicitly configured existingSecret keeps its Kubernetes name after its reference is moved to the new values path.

Tempo 3 Migration for 1.15

Release 1.15 updates bundled LGTM to grafana/otel-lgtm:0.30.1 with Tempo 3.0.2. The bundled deployment remains monolithic and does not require Kafka. The chart now uses the Tempo 3 configuration supplied by the image instead of maintaining a complete Tempo configuration copy.

When lgtm.retention.traces is set and lgtm.env.TEMPO_EXTRA_ARGS is empty, the chart passes the retention to both the Tempo 3 backend scheduler and backend worker. Integer day values such as 14d are converted to 336h. A non-empty TEMPO_EXTRA_ARGS value continues to replace the automatic retention arguments.

Before upgrading:

  • back up and test restoration of the LGTM data PVC

  • confirm all persisted Tempo blocks use vParquet4 or later

  • review image overrides and custom TEMPO_EXTRA_ARGS

  • migrate any separately mounted Tempo configuration with tempo-cli migrate config --mode=monolithic, removing Tempo 2 ingester, compactor, local_blocks, and flat legacy override settings

If trace retention was the only customization, the chart performs the configuration switch automatically. The automatic helper does not support an older Tempo 2 image override.

After the rollout, inspect Tempo's effective /status/config and query a trace from before and after the upgrade. Tempo 3 has no supported in-place downgrade to Tempo 2, so a return to the previous release requires restoring the pre-upgrade LGTM data snapshot as well as the old chart and image. A Helm rollback alone is not sufficient. See the upstream Tempo 3 migration guide and Backup and Restore.

Studio CLI Initialization for 1.16

Release 1.16 adds components.studioBackend.cliInit, enabled by default. It runs quay.io/intrexx/customer-ix-cli:1.16.0 as a one-shot Job after Studio becomes healthy. The Job imports the package embedded in the image and authenticates with keycloak.serviceClient.*.

Its name contains a hash of the effective Job configuration, so relevant image, credentials, or pod-setting changes create a new immutable Job. Verify the service-client credentials and review the Job logs after upgrading. Disable the initializer only when the same Studio setup is managed elsewhere.

Assistant API-Key Migration for 1.16

Release 1.16 changes the Assistant to consume OPENAI_API_KEY and removes AGENT_SETTINGS__API_KEY, AGENT_SETTINGS__PROVIDER, and AGENT_SETTINGS__MODEL_NAME. The chart-managed Secret changes from <fullname>-assistant-api-key with key AGENT_SETTINGS__API_KEY to <fullname>-assistant-openai-api-key with key OPENAI_API_KEY; the old Secret is intentionally not reused.

For an existing externally managed key, create a replacement Secret before upgrading:

Kopieren
kubectl -n ix25 create secret generic assistant-openai-api-key \
  --from-literal=OPENAI_API_KEY='<openai-api-key>'

Point the new release to it and remove agentSettings from every values layer:

Kopieren
components:
  assistant:
    apiKey:
      existingSecret: assistant-openai-api-key
      existingSecretKey: OPENAI_API_KEY

Deployments using apiKey.value can retain the value; Helm creates the new chart-managed Secret. Validate the Assistant rollout and logs before deleting the old external Secret. Retain the old Secret while rollback remains possible.

  1. Create or verify a backup.

  2. Render the new manifests.

  3. Review the effective changes.

  4. Apply the upgrade.

  5. Enforce single-instance rollout behavior.

  6. Watch the rollout.

  7. Validate application, authentication, storage, and observability.

14.4 Rendering and Reviewing Changes

Kopieren
helm lint ./ix25
helm template ix25 ./ix25 \
  --namespace ix25 \
  -f ./values.customer.yaml > /tmp/ix25-rendered.yaml

If the Helm diff plugin is available:

Kopieren
helm diff upgrade ix25 ./ix25 \
  --namespace ix25 \
  -f ./values.customer.yaml

Review changes especially carefully when modifying images, dependencies, ingress, Secret references, persistence, or observability.

14.5 Applying an Upgrade

Kopieren
helm upgrade --install ix25 ./ix25 \
  --namespace ix25 --create-namespace \
  -f ./values.customer.yaml

Use the same values layering as the original deployment.

14.6 Single-Instance Rollout Behavior

Running multiple replicas of IX25 application services is currently not supported. During upgrades, ensure each application Deployment keeps exactly one replica and uses a rollout strategy that does not create a second pod before the old pod is stopped.

The chart defaults all IX25 application components to replicaCount: 1 and renders their Deployments with the Recreate strategy:

Kopieren
components:
  deploymentStrategy:
    type: Recreate
  studioBackend:
    replicaCount: 1
  appBuilderBackend:
    replicaCount: 1
  appPortalBackend:
    replicaCount: 1
  dataBuilderBackend:
    replicaCount: 1
  processBuilderBackend:
    replicaCount: 1
  processBuilderConverter:
    replicaCount: 1
  fileStorageService:
    replicaCount: 1
  assistant:
    replicaCount: 1
  staticConfig:
    replicaCount: 1
  staticFrontend:
    replicaCount: 1

Kubernetes Deployments normally use a rolling update strategy that may temporarily create an additional pod during an update. With Recreate, Kubernetes stops the existing pod before creating the replacement pod, so the chart does not need an additional GitOps post-renderer or Kustomize patch for the single-instance rollout mode.

When upgrading an existing release whose Deployments were created with the previous implicit RollingUpdate strategy, server-side apply can fail while changing the strategy because the Kubernetes API-defaulted rollingUpdate field is still present during validation. If that happens, apply this one-time merge patch before rerunning the Helm upgrade:

Kopieren
kubectl -n ix25 patch deployment \
  ix25-app-builder \
  ix25-portal \
  ix25-data-builder \
  ix25-file-storage \
  ix25-process-builder \
  ix25-process-converter \
  ix25-static-config \
  ix25-static-frontend \
  ix25-studio \
  --type merge \
  -p '{"spec":{"strategy":{"type":"Recreate","rollingUpdate":null}}}'

Adjust the deployment names if the Helm release name is not ix25 or if optional components are disabled. After this one-time cleanup, Helm owns the Recreate strategy through chart values.

This rollout mode can cause short service interruptions during updates because the old pod is stopped before the replacement pod becomes Ready. That is intentional until multi-replica support is available.

Do not scale a component above one replica as a workaround. Instead, schedule a maintenance window and validate the effective Deployment strategy before applying the upgrade:

Kopieren
kubectl -n ix25 get deployment ix25-studio \
  -o jsonpath='{.spec.strategy.type}{"\n"}'

As soon as multi-replica application services are supported, override the shared deployment strategy and the affected replica counts in your values file instead of patching live Deployments. Example for a future rolling update configuration:

Kopieren
components:
  deploymentStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  studioBackend:
    replicaCount: 2
  appBuilderBackend:
    replicaCount: 2

Only apply this pattern after the release notes explicitly state that the selected components support multiple replicas.

After applying an upgrade, verify that no application Deployment has more than one desired or available replica:

Kopieren
kubectl -n ix25 get deployments

14.7 Watching the Rollout

Kopieren
kubectl -n ix25 get pods -w
kubectl -n ix25 get events --sort-by=.lastTimestamp
kubectl -n ix25 get ingressroutes.traefik.io

Inspect key logs:

Kopieren
kubectl -n ix25 logs deployment/ix25-studio --tail=100
kubectl -n ix25 get jobs -l app.kubernetes.io/component=studio-cli-init
kubectl -n ix25 logs job/<studio-cli-init-job-name>
kubectl -n ix25 logs deployment/ix25-file-storage --tail=100

14.8 Common Upgrade Scenarios

Changing only image tags is usually lower risk when dependencies, persistence, and Secrets remain stable.

Switching bundled dependencies to external dependencies is experimental and higher risk. Validate migration, connectivity, credentials, and rollback before applying.

Changing Secret sources is safe only when the target Secret already exists and contains the expected keys.

When upgrading from a chart version that configured a long-lived Vault reviewer JWT, Helm removes the obsolete <release>-vault-tokenreviewer Secret and creates a revision-specific bootstrap Job. The Job switches Vault to the projected service account token mounted in the Vault pod. Use --wait --wait-for-jobs so Helm reports success only after reconciliation completes. New Kubernetes logins to Vault can fail until the Job finishes; existing Vault tokens remain valid for their normal TTL.

Changing an existing bundled NATS StatefulSet to nats.persistence.existingClaim or nats.persistence.enabled=false removes its immutable claim template. Back up JetStream data, prepare the replacement PVC in the same namespace when applicable, delete only the NATS StatefulSet, and then run the Helm upgrade with the new value. This causes NATS downtime. Kubernetes retains the old generated PVC; the chart neither copies its data nor deletes it automatically.

14.9 Post-Upgrade Validation

After every upgrade, confirm:

  • pods are Running or Completed as expected

  • no pods are stuck in Init, CrashLoopBackOff, or ImagePullBackOff

  • the main IX25 URL responds

  • Keycloak login works

  • API routes respond

  • file storage works

  • observability and backup integrations still work

  • the Studio CLI initialization Job completed, when enabled

Suggested commands:

Kopieren
kubectl -n ix25 get pods
kubectl -n ix25 get jobs
kubectl -n ix25 get ingressroutes.traefik.io
kubectl -n ix25 get middlewares.traefik.io
helm status ix25 -n ix25

14.10 Version-Specific Notes

Review chart release notes before upgrading. Version-specific changes can affect workload types, persistence, image tags, and values behavior.

For example, in chart version 1.11.0, bundled Keycloak changed from StatefulSet to Deployment and durable state moved to PostgreSQL. Existing old PVCs may need manual review after upgrade.

14.11 Rollback Guidance

Use Helm rollback when the upgrade fails and persistent state has not been irreversibly changed:

Kopieren
helm history ix25 -n ix25
helm rollback ix25 <revision> -n ix25

After rollback, verify pods, routes, authentication, and storage.

If the failed upgrade changed or damaged persistent state, restore from backup instead of relying only on Helm rollback.

14.12 Changes Requiring Extra Caution

Treat these changes as high risk:

  • switching between bundled and external PostgreSQL

  • changing Vault mode or bootstrap behavior

  • changing s3.provider

  • changing storage classes or persistence settings

  • changing ingress domains or TLS Secrets

  • changing observability mode

  • rotating credentials without validating consumer access